<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div id="box1">
	<h2>
		<c:out value="${user.name} " />
	</h2>
	<p>
		<strong>Id: <c:out value="${user.id}" /></strong> Your orders:
	<table>
		<tr>
			<th>Order Id</th>
			<th>Book Id</th>
			<th>Book</th>
			<th>Return date</th>
		</tr>
		<c:forEach var="order" items="${orders}">
			<tr>
				<td><c:out value="${order.id}" /></td>
				<td><c:out value="${order.book.id}" /></td>
				<td><c:out value="${order.book.bookClass.name}" /></td>
				<fmt:formatDate value="${order.returnDate}" var="returnDate" pattern="dd/MM/yyyy" />
				<td><c:out value="${returnDate}" /></td>
			</tr>
		</c:forEach>
	</table>
	</p>
</div>

